/**
 * Copyright 2013-2015
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */	  

package com.cos.service.interfaces.circle;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cos.dao.DaoSupport;
import com.cos.util.PageData;

/**
 * 企业圈动态
 * <p/>
 * 
 * @author <a href="mailto:978954852@qq.com">xfjin</a>
 * @version  Date: 2016年4月15日 下午9:02:29
 * @serial 1.0
 * @since 2016年4月15日 下午9:02:29
 */
@Service("companyDynamicService")
public class CompanyDynamicService {
	@Resource(name = "daoSupport")
	private DaoSupport dao;

	/**
	 * 获取关注企业的列表
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getFocusCompany(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("CompanyDynamicMapper.getFocusCompany", pd);
	}

	
	
	/**
	 * 关注一个企业
	 * @param pd
	 * @throws Exception
	 */
	public void saveFocusCompany(PageData pd) throws Exception {
		dao.save("CompanyDynamicMapper.saveFocusCompany", pd);
	}



	/**
	 * 获取推荐企业
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyRecommend(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyRecommend", pd);
	}



	/**
	 * 根据企业ID  获取企业的最新两条动态
	 * @param C_ID
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyDynamic(String C_ID) throws Exception {
		return (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyDynamic", C_ID);
	}



	/**
	 * 获取我的收藏列表
	 * @param pd
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyCollection(PageData pd) throws Exception {
		return  (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyCollection",pd);
	}



	/**
	 * 新增我的收藏
	 * @param pd
	 * @throws Exception 
	 */
	public void saveCompanyCollection(PageData pd) throws Exception {
		dao.save("CompanyDynamicMapper.saveCompanyCollection", pd);
	}



	/**
	 * 获取类别列表
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyType(PageData pd) throws Exception {
		return  (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyType",pd);
	}



	/**
	 * 根据类别获取企业
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyByType(PageData pd) throws Exception {
		return  (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyByType",pd);
	}


	
	/**
	 * 定制企业的列表
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getCompanyCustom(PageData pd) throws Exception {
		return  (List<PageData>) dao.findForList("CompanyDynamicMapper.getCompanyCustom",pd);
	}



	/**
	 * 新增一个我的定制公司
	 * @param pd
	 * @throws Exception
	 */
	public void saveCompanyCustom(PageData pd) throws Exception {
		dao.save("CompanyDynamicMapper.saveCompanyCustom", pd);
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
